package com.anche.cywebnew.DAO.systemManager;

import com.anche.cywebnew.DTO.SelectDTO;
import com.anche.cywebnew.Pojo.systemManager.SysOrganization;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrganMapper {
    List<SysOrganization> selectOrganList(@Param("organ") SysOrganization sysOrganization, @Param("cyqxhs") List<String> cyqxhs);

    void updateOrganByCyqxh(SysOrganization sysOrganization);

    void insertOrgan(SysOrganization sysOrganization);

    void deleteOrganByIds(@Param("list") List<String> idsResult);

    List<String> getIdsByPids(@Param("list") List<String> idsQuery);

    /**
     * 获得当前所有机构的数量
     *
     * @return
     */
    int selectAllCount();

    /**
     * 根据查验区序号查询数量
     *
     * @param cyqxh
     * @return
     */
    int selectCountByCyqxh(@Param("cyqxh") String cyqxh);

    String selectNameByCyqxh(@Param("cyqxh") String cyqxh);

    SysOrganization selectOneByCyqxh(@Param("cyqxh") String cyqxh);

    String selectPOrganByCyqxh(@Param("cyqxh") String organ);
}
